/*
package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.entity.Student;
import com.example.mapper.StudentMapper;
import com.example.service.IStudentService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {

    @Override
    public Page<Student> page(Integer current, Integer size, String student_name) {
        LambdaQueryWrapper<Student> wrapper = new LambdaQueryWrapper<>();
        if (!"".equals(student_name)) {
            //wrapper.eq(Student::getStudent_name,student_name);

            wrapper.like(Student::getStudent_name, student_name);
        }
        Page<Student> page = page(new Page<>(
                        current,
                        size
                ),
                wrapper
        );
        return page;
    }

    @Override
    public boolean saveOrUpdateById(Student student) {
        if (student.getStudent_no() != null) {
            return updateById(student);
        } else {
            return save(student);
        }

    }

    @Override
    public boolean deleteBatchIds(List<Integer> student_ids) {
        return removeBatchByIds(student_ids);
    }
}
*/
